package com.gl.mapper;

import com.gl.pojo.entity.UserCount;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface UserCountMapper {

    @Select("SELECT date, count FROM user_count where date between #{start} and #{end}")
    List<UserCount> getUserCount(LocalDate start, LocalDate end);

    @Insert("insert into user_count (date, count) values (#{date}, #{count})")
    void insertUserCount(UserCount userCount);
}
